home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Click 1 (Special Issue)
/
fantasy.iso
/
Demo The Druid King
/
DemoMap.pak
/
SEQUENCES_S01_REPAIR_WKORTHE.VS
< prev
next >
Wrap
Text File
|
2001-04-11
|
708b
|
33 lines
//void
ObjList Wkorthe;
int i;
bool bRepaired;
TRect rc;
//damage the buildings
rc.Set(661, 4368, 1737, 6371);
Wkorthe.AddBuildingsInRect(rc, 1);
if (Wkorthe.Count() != 5) pr("Not all 5 Wkorthe houses have been found");
for (i=0; i<5; i+=1) {
// Wkorthe[i].Damage(3*Wkorthe[i].maxhealth / 4);
Wkorthe[i].Damage(Wkorthe[i].maxhealth);
}
//wait until they are repaired
while (1) {
bRepaired = true;
for (i=0; i<5; i+=1) {
if (Wkorthe[i].health != Wkorthe[i].maxhealth) {
bRepaired = false;
break;
}
}
if (bRepaired) break;
Sleep(3000);
}
//Wkorthe is repaired
EnvWriteInt("/s01/WkortheRepaired", 1);
EnvWriteInt("/Note2", 0);